
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" template="/template/main.xhtml">

	<ui:define name="body">
		<h:form>
			<p:toolbar>
				<p:toolbarGroup align="left">

					<p:confirmDialog message="#{messages['label.confirm.delete']}" showEffect="bounce" hideEffect="explode"
						header="#{messages['label.dialog.alert']}!" severity="alert" widgetVar="confirmation">

						<h:commandButton value="#{messages['button.dialog.yes']}" action="#{tbFuncionarioListMB.deleteSelection}"
							actionListener="#{tbFuncionarioListMB.clear}" />
						<h:commandButton value="#{messages['button.dialog.no']}" onclick="confirmation.hide()" type="button" />
					</p:confirmDialog>
				</p:toolbarGroup>
			</p:toolbar>
			<p:dataTable id="list" var="bean" value="#{tbFuncionarioListMB.resultList}" emptyMessage="Nenhum funcionário encontrado" paginator="true" rows="10">
				<f:facet name="header">#{messages['tbFuncionario.list.table.title']}</f:facet>
				<p:column style="width:1%;">
					<h:selectBooleanCheckbox value="#{tbFuncionarioListMB.selection[bean.id]}"></h:selectBooleanCheckbox>
				</p:column>
						
				<p:column sortBy="#{bean.nmFuncionario}">
					<f:facet name="header">#{messages['tbFuncionario.label.nmFuncionario']}</f:facet>
					<h:commandLink action="#{tbFuncionarioListMB.getNextView}" actionListener="#{tbFuncionarioListMB.clear}">
						<h:outputText value="#{bean.nmFuncionario}" />
						<f:param name="id" value="#{bean.id}" />
					</h:commandLink>
				</p:column>
					
				<p:column headerText="#{messages['tbFuncionario.label.foneFuncionario']}">
						<h:outputText value="#{bean.foneFuncionario}" />
				</p:column>	
						
			</p:dataTable>
		</h:form>

	</ui:define>
</ui:composition>